import { lazy } from 'react'
import { Navigate } from 'react-router-dom'
import cxl from './cxl'
import ccl from './ccl'
import cgg from './cgg'
import wy from './wy'
import kxd from './kxd'
const Index = lazy(() => import('../views/Index'))
const Login = lazy(() => import('../views/Login'))
const NotFound = lazy(() => import('../views/NotFound'))


let routerConfig = [
    {
        path: '/index',
        element: <Index />,
        children: [
            ...cxl,
            ...ccl,
            ...cgg,
            ...wy,
            ...kxd,
            {
                path: '/index',
                element: <Navigate to='/index/home' />,
            },
            {
                path: '*',
                element: <NotFound />
            }
        ]
    },
    {
        path: '/login',
        element: <Login />,

    },
    {
        path: '/',
        element: <Navigate to='/login' />,
    },
    {
        path: '*',
        element: <NotFound />,
    },

]

export default routerConfig